﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Ex03.GarageLogic
{
    public class InternalCombustionBus : Bus
    {
        private const float k_InternalCombustionBusMaximumFuelCapacityInLitres = 200F;
        private const EnergyType.eEnergyType k_InternalCombustionBusFuelType = EnergyType.eEnergyType.Soler;
        private const int k_InternalCombustionBusWheelAmount = 8;
        private const float k_InternalCombustionBusWheelMaximumAirPressure = 25F;

        private InternalCombustionPropulsion m_InternalCombustionBusPropulsionType;

        public InternalCombustionBus(
            string i_InternalCombustionBusModelName,
            string i_InternalCombustionBusLicenseNumber,
            int i_InternalCombustionBusMaximumPassengersAmountAllowed,
            bool i_InternalCombustionBusTourGuideSeatPresent)
            : base(
            i_InternalCombustionBusModelName,
            i_InternalCombustionBusLicenseNumber, 
            k_InternalCombustionBusWheelAmount,
            k_InternalCombustionBusWheelMaximumAirPressure,
            i_InternalCombustionBusMaximumPassengersAmountAllowed,
            i_InternalCombustionBusTourGuideSeatPresent)
        {
            m_InternalCombustionBusPropulsionType = new InternalCombustionPropulsion(k_InternalCombustionBusFuelType, k_InternalCombustionBusMaximumFuelCapacityInLitres);
        }

        public override bool AddPropulsionMaterial(
            EnergyType.eEnergyType i_PropulsionMaterialType,
            float i_PropulsionMaterialAmountToAdd)
        {
            return m_InternalCombustionBusPropulsionType.AddPropulsionMaterial(i_PropulsionMaterialType, 
                i_PropulsionMaterialAmountToAdd);
        }

        //public void SetCurrentFuelAmountInTankInLitres(float i_CurrentFuelAmountInTankInLitres)
        //{
        //    m_Engine.CurrentFuelAmountInTank = i_CurrentFuelAmountInTankInLitres;
        //}

        //public override List<String> CollectQustionsListToAskUser()
        //{
        //    List<String> Qustions = new List<String>();
        //    Qustions = base.CollectQustionsListToAskUser();
        //    Qustions.Add(String.Format("Enter Current Amount Of Fuel :"));

        //    return Qustions;
        //}

        //public override void GetStringsFromUserAndUpdateVehicleData(List<String> i_Answers)
        //{
        //    base.GetStringsFromUserAndUpdateVehicleData(i_Answers);
        //    try
        //    {
        //        m_Engine.CurrentFuelAmountInTank = float.Parse(i_Answers[0]);
        //    }
        //    catch (Exception ex)
        //    { 
        //        ex = new Exception ("Erorr Fuel Amout Is Not A Number");
        //    }
        //}

        //public override List<string> GetAllInformation()
        //{
        //    List<String> ReturnValue = null;
        //    ReturnValue = base.GetAllInformation();
        //    if (ReturnValue == null)
        //    {
        //        ReturnValue = new List<String>();
        //    }

        //    ReturnValue.Insert(0, String.Format("Vehicle Type : Internal Combustion Bus"));

        //    return ReturnValue;
        //}
    }
}
